/*
 * Copyright (c) 2025. hallele, Inc All rights reserved.
 */

package cn.hallele.ms.portalcenter.application.action.menu.query.routes.flow;

import cn.hallele.ms.portalcenter.application.bo.MenuBO;
import cn.hallele.ms.portalcenter.application.bo.MenuQueryBO;
import cn.hallele.ms.portalcenter.application.das.MenuBDDas;
import cn.hallele.ms.starter.web.framework.node.ServiceFlow;
import com.yomahub.liteflow.annotation.LiteflowComponent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * 查询路由
 *
 * @author anle5
 * @since 2025/1/2 22:15
 */
@Slf4j
@LiteflowComponent
public class QueryMenuListFlow extends ServiceFlow {
    @Autowired
    private MenuBDDas menuBDDas;

    @Override
    public void process() throws Exception {
        MenuQueryBO condition = this.getRequestData();
        List<MenuBO> menus =menuBDDas.getMenus(condition);
        this.setResult(menus);
    }
}
